import request from '@/utils/request';
import * as RequestHelper from '@/helpers/RequestHelper';
import request from '@/utils/request';

export async function queryCurrent() {
  return request('/api/currentUser');
}

export async function queryProvince() {
  return request('/api/geographic/province');
}

export async function queryCity(province: string) {
  return request(`/api/geographic/city/${province}`);
}

export async function query() {
  return request('/api/users');
}

export async function updateRule(params: any) {
  return request('/api/admin/shareusers/update', {
    method: 'POST',
    data: {
      ...params,
      method: 'update',
    },
  });
}

export async function updatePwd(params: any) {
  return request('/api/admin/admin/updatePassword', {
    method: 'POST',
    data: {
      ...params,
      method: 'update',
    },
  });
}
